package com.eascs.admin.o2o.internal.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.eascs.admin.common.service.BaseSevice;
import com.eascs.admin.o2o.internal.dao.AuditCommentsDao;
import com.eascs.admin.o2o.internal.entity.AuditComments;
import com.eascs.app.dao.PageResult;
/**
 * 内审工作流表单历史  Service
 * @author ycz
 *
 */
@Service
public class AuditCommentService  extends BaseSevice{
	@Autowired
	private AuditCommentsDao auditCommentsDao;
	
	public PageResult<AuditComments> queryListPage(AuditComments df, int pageSize, int pageIndex){
		return queryListPage(df, pageSize, pageIndex);
	}
	@Transactional(transactionManager = "transactionManager")
	public void add(AuditComments auditComments){
		auditCommentsDao.insert(auditComments);
	}
	@Transactional(transactionManager = "transactionManager")
	public void update(AuditComments auditComments){
		auditCommentsDao.updateById(auditComments);
	}
	@Transactional(transactionManager = "transactionManager")
	public void delete(AuditComments auditComments){
		auditCommentsDao.delete(auditComments);
	}
	
	public AuditComments queryById(String id) {
		return auditCommentsDao.getById(AuditComments.class, id);
	}
	public PageResult<Object[]> findAuditList(String loanapplyNo) {
		return auditCommentsDao.findAuditList(loanapplyNo);
	}
	public List<AuditComments> findAuditsList(String loanapplyNo){
		return auditCommentsDao.queryAuditCommentsList(loanapplyNo);
	}
	public List<AuditComments> queryUserNo(String loanapplyNo, String auditorId) {
		return auditCommentsDao.queryUserNo(loanapplyNo,auditorId);
	}
}
